From: cl349@firebug.cl.cam.ac.uk Date: Tue, 13 Sep 2005 20:54:41 +0000 (+0000) Subject: Switch shutdown and sysrq to xstransact. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~16806^2~28 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=52ae2445d4cd4998c15769b55097a912253a3888;p=xen.git Switch shutdown and sysrq to xstransact. Signed-off-by: Christian Limpach --- diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index 85f6abcdd8..8ac581241d 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -1055,21 +1055,15 @@ class XendDomainInfo: def shutdown(self, reason): if not reason in shutdown_reasons.values(): raise XendError('invalid reason:' + reason) - db = self.db.addChild("/control"); - db['shutdown'] = reason; - db.saveDB(save=True); + xstransact.Write(self.path, "control/shutdown", reason) if not reason in ['suspend']: self.shutdown_pending = {'start':time.time(), 'reason':reason} def clear_shutdown(self): - db = self.db.addChild("/control") - db['shutdown'] = "" - db.saveDB(save=True) + xstransact.Remove(self.path, "control/shutdown") def send_sysrq(self, key=0): - db = self.db.addChild("/control"); - db['sysrq'] = '%c' % key; - db.saveDB(save=True); + xstransact.Write(self.path, "control/sysrq", '%c' % key) def shutdown_time_left(self, timeout): if not self.shutdown_pending: